/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * VentanaOperacionesHabitacion.java
 *
 * Created on 25/06/2010, 11:46:31 AM
 */

package CapaGrafica;
import CapaDatos.Habitacion;
import java.text.ParseException;
import java.util.ArrayList;
import java.util.Vector;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JOptionPane;
import javax.swing.table.DefaultTableModel;
import CapaPersistencia.ControladorHabitacion;
import CapaLogica.GestionResort;
import java.awt.Image;
import java.awt.Toolkit;
/**
 *
 * @author Maria
 */
public class VentanaOperacionesHabitacion extends javax.swing.JFrame {
private ControladorHabitacion controlHabitacion = new ControladorHabitacion();
    /** Creates new form VentanaOperacionesHabitacion */
    public VentanaOperacionesHabitacion() {
        initComponents();
        this.setSize(600,500);
        mostrarTabla();
    }
    private void mostrarTabla() {
        DefaultTableModel dm = new DefaultTableModel();
        dm.addColumn("Tipo Habitacion");
        dm.addColumn("Id");
        dm.addColumn("Area");
        dm.addColumn("Estado Actual");

        ArrayList <Habitacion> habitaciones = this.controlHabitacion.todasLasHabitaciones();

        for (Habitacion habitacion : habitaciones) {
            Vector row = new Vector();
            GestionResort.getLasHabitaciones().agregarElemento(habitacion);
            row.add(habitacion.getTipoHab());
            row.add(habitacion.getID());
            row.add(habitacion.getArea());
            row.add(habitacion.getEdoActual());
            dm.addRow(row);
        }
        this.tablaHabitaciones.setModel(dm);


    }

    private void mostrarHabitacion(String id) throws ParseException {
        Habitacion HabitacionMostrar = this.controlHabitacion.buscarHabitacion(id);

        this.sjTFId.setText(HabitacionMostrar.getID());
        this.sjTFArea.setText(HabitacionMostrar.getArea());
        this.sjCEstadoActual.setSelectedItem(HabitacionMostrar.getEdoActual());
        this.sjCTipoHab.setSelectedItem(HabitacionMostrar.getTipoHab());
    }


    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jScrollPane1 = new javax.swing.JScrollPane();
        jScrollPane2 = new javax.swing.JScrollPane();
        tablaHabitaciones = new javax.swing.JTable();
        jTabbedPane1 = new javax.swing.JTabbedPane();
        jPanel1 = new javax.swing.JPanel();
        njCEstadoActual = new javax.swing.JComboBox();
        njCTipoHab = new javax.swing.JComboBox();
        njTFArea = new javax.swing.JTextField();
        njTFId = new javax.swing.JTextField();
        njAgregar = new javax.swing.JButton();
        jLabel1 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        jLabel9 = new javax.swing.JLabel();
        jPanel2 = new javax.swing.JPanel();
        sjCEstadoActual = new javax.swing.JComboBox();
        sjCTipoHab = new javax.swing.JComboBox();
        sjTFArea = new javax.swing.JTextField();
        sjTFId = new javax.swing.JTextField();
        jLabel5 = new javax.swing.JLabel();
        jLabel6 = new javax.swing.JLabel();
        jLabel7 = new javax.swing.JLabel();
        jLabel8 = new javax.swing.JLabel();
        sjBBorrar = new javax.swing.JButton();
        sjBActualizar = new javax.swing.JButton();
        jLabel10 = new javax.swing.JLabel();
        jSeparator1 = new javax.swing.JSeparator();
        jLabel16 = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setTitle("Gestion de Habitaciones");
        setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        setLocationByPlatform(true);

        jScrollPane1.setName("jScrollPane1"); // NOI18N

        jScrollPane2.setName("jScrollPane2"); // NOI18N

        tablaHabitaciones.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null}
            },
            new String [] {
                "Title 1", "Title 2", "Title 3", "Title 4"
            }
        ));
        tablaHabitaciones.setName("tablaHabitaciones"); // NOI18N
        tablaHabitaciones.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseReleased(java.awt.event.MouseEvent evt) {
                tablaHabitacionesMouseReleased(evt);
            }
        });
        tablaHabitaciones.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                tablaHabitacionesKeyReleased(evt);
            }
        });
        jScrollPane2.setViewportView(tablaHabitaciones);

        jScrollPane1.setViewportView(jScrollPane2);

        jTabbedPane1.setName("jTabbedPane1"); // NOI18N

        jPanel1.setBackground(new java.awt.Color(0, 102, 153));
        jPanel1.setName("jPanel1"); // NOI18N

        njCEstadoActual.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "<Seleccione>", "Danada", "Habilitada" }));
        njCEstadoActual.setName("njCEstadoActual"); // NOI18N

        njCTipoHab.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "<Selecione>", "Cabana", "Normal" }));
        njCTipoHab.setName("njCTipoHab"); // NOI18N

        njTFArea.setName("njTFArea"); // NOI18N

        njTFId.setName("njTFId"); // NOI18N

        njAgregar.setText("Agregar");
        njAgregar.setName("njAgregar"); // NOI18N
        njAgregar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                njAgregarActionPerformed(evt);
            }
        });

        jLabel1.setText("Estado actual:");
        jLabel1.setName("jLabel1"); // NOI18N

        jLabel2.setText("Tipo Habitacion:");
        jLabel2.setName("jLabel2"); // NOI18N

        jLabel3.setText("Superficie:");
        jLabel3.setName("jLabel3"); // NOI18N

        jLabel4.setText("ID:");
        jLabel4.setName("jLabel4"); // NOI18N

        jLabel9.setText("Datos:");
        jLabel9.setName("jLabel9"); // NOI18N

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGap(97, 97, 97)
                        .addComponent(njAgregar))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGap(18, 18, 18)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jLabel2)
                                    .addComponent(jLabel3)
                                    .addComponent(jLabel4))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(njTFArea, javax.swing.GroupLayout.DEFAULT_SIZE, 86, Short.MAX_VALUE)
                                    .addComponent(njCTipoHab, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(njTFId, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 124, Short.MAX_VALUE)))
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addComponent(jLabel1)
                                .addGap(18, 18, 18)
                                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jLabel9)
                                    .addComponent(njCEstadoActual, javax.swing.GroupLayout.PREFERRED_SIZE, 124, javax.swing.GroupLayout.PREFERRED_SIZE))))))
                .addContainerGap(42, Short.MAX_VALUE))
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGap(21, 21, 21)
                .addComponent(jLabel9)
                .addGap(27, 27, 27)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel1)
                    .addComponent(njCEstadoActual, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel2)
                    .addComponent(njCTipoHab, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(njTFArea, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel3))
                .addGap(18, 18, 18)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(njTFId, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel4))
                .addGap(32, 32, 32)
                .addComponent(njAgregar)
                .addContainerGap(15, Short.MAX_VALUE))
        );

        jTabbedPane1.addTab("Agregar:", jPanel1);

        jPanel2.setBackground(new java.awt.Color(0, 102, 153));
        jPanel2.setName("jPanel2"); // NOI18N

        sjCEstadoActual.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "<Seleccione>", "Danada", "Habilitada" }));
        sjCEstadoActual.setName("sjCEstadoActual"); // NOI18N

        sjCTipoHab.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "<Seleccione>", "Cabana", "Normal" }));
        sjCTipoHab.setName("sjCTipoHab"); // NOI18N

        sjTFArea.setName("sjTFArea"); // NOI18N

        sjTFId.setName("sjTFId"); // NOI18N

        jLabel5.setText("Estado actual:");
        jLabel5.setName("jLabel5"); // NOI18N

        jLabel6.setText("Tipo Habitacion:");
        jLabel6.setName("jLabel6"); // NOI18N

        jLabel7.setText("Superficie:");
        jLabel7.setName("jLabel7"); // NOI18N

        jLabel8.setText("ID:");
        jLabel8.setName("jLabel8"); // NOI18N

        sjBBorrar.setText("Borrar");
        sjBBorrar.setName("sjBBorrar"); // NOI18N
        sjBBorrar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                sjBBorrarActionPerformed(evt);
            }
        });

        sjBActualizar.setText("Actualizar");
        sjBActualizar.setName("sjBActualizar"); // NOI18N
        sjBActualizar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                sjBActualizarActionPerformed(evt);
            }
        });

        jLabel10.setText("Datos:");
        jLabel10.setName("jLabel10"); // NOI18N

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addGap(117, 117, 117)
                .addComponent(jLabel10)
                .addContainerGap(122, Short.MAX_VALUE))
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel5)
                .addGap(26, 26, 26)
                .addComponent(sjCEstadoActual, 0, 156, Short.MAX_VALUE)
                .addContainerGap())
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel6)
                .addGap(18, 18, 18)
                .addComponent(sjCTipoHab, 0, 156, Short.MAX_VALUE)
                .addContainerGap())
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addGap(34, 34, 34)
                .addComponent(sjBActualizar)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 44, Short.MAX_VALUE)
                .addComponent(sjBBorrar, javax.swing.GroupLayout.PREFERRED_SIZE, 84, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(30, 30, 30))
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel7)
                    .addComponent(jLabel8))
                .addGap(44, 44, 44)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(sjTFId, javax.swing.GroupLayout.DEFAULT_SIZE, 156, Short.MAX_VALUE)
                    .addComponent(sjTFArea, javax.swing.GroupLayout.DEFAULT_SIZE, 156, Short.MAX_VALUE))
                .addContainerGap())
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel10)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(sjCEstadoActual, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel5))
                .addGap(20, 20, 20)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel6)
                    .addComponent(sjCTipoHab, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel7)
                    .addComponent(sjTFArea, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel8)
                    .addComponent(sjTFId, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(46, 46, 46)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(sjBActualizar)
                    .addComponent(sjBBorrar))
                .addGap(49, 49, 49))
        );

        jTabbedPane1.addTab("Actualizar o Eliminar:", jPanel2);

        jSeparator1.setName("jSeparator1"); // NOI18N

        jLabel16.setFont(new java.awt.Font("Trebuchet MS", 0, 36));
        jLabel16.setForeground(new java.awt.Color(0, 51, 204));
        jLabel16.setText("i-Resort.");
        jLabel16.setName("jLabel16"); // NOI18N

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addComponent(jLabel16, javax.swing.GroupLayout.PREFERRED_SIZE, 389, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(337, 337, 337)
                .addComponent(jSeparator1, javax.swing.GroupLayout.DEFAULT_SIZE, 1, Short.MAX_VALUE))
            .addGroup(layout.createSequentialGroup()
                .addComponent(jTabbedPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 276, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
            .addGroup(layout.createSequentialGroup()
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 522, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel16, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 130, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jTabbedPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 287, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(26, 26, 26))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void tablaHabitacionesMouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_tablaHabitacionesMouseReleased
    int row = this.tablaHabitaciones.getSelectedRow();
        String id = (String) this.tablaHabitaciones.getModel().getValueAt(row, 1);
        try {
            this.mostrarHabitacion(id);
        } catch (ParseException ex) {
            Logger.getLogger(VentanaOperacionesHabitacion.class.getName()).log(Level.SEVERE, null, ex);
        } // TODO add your handling code here:
    }//GEN-LAST:event_tablaHabitacionesMouseReleased

    private void sjBActualizarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_sjBActualizarActionPerformed
       boolean resultado = false;
        String tipoHab = (String) sjCTipoHab.getSelectedItem();
        String id = sjTFId.getText();
        String area = sjTFArea.getText();
        String edoActual = (String) sjCEstadoActual.getSelectedItem();
        resultado = this.controlHabitacion.actualizarHabitacion(tipoHab, id, area, edoActual);
        if (resultado) {
            JOptionPane.showMessageDialog(null, "Habitacion " + id + " actualizado con exito", "Actualizado",
                    JOptionPane.INFORMATION_MESSAGE);
            this.mostrarTabla();
        } else {
            JOptionPane.showMessageDialog(null, "Operacion Fallida", "Error",
                    JOptionPane.ERROR_MESSAGE);
        } // TODO add your handling code here:
    }//GEN-LAST:event_sjBActualizarActionPerformed

    private void sjBBorrarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_sjBBorrarActionPerformed
       boolean resultado = this.controlHabitacion.eliminarHabitacion(this.sjTFId.getText());
        if (resultado) {
            JOptionPane.showMessageDialog(null, "Habitacion " + this.sjTFId.getText() + " borrado con exito", "Borrado",
                    JOptionPane.INFORMATION_MESSAGE);
            this.mostrarTabla();
        } else {
            JOptionPane.showMessageDialog(null, "Operacion Fallida", "Error",
                    JOptionPane.ERROR_MESSAGE);
        } // TODO add your handling code here:
    }//GEN-LAST:event_sjBBorrarActionPerformed

    private void njAgregarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_njAgregarActionPerformed
       boolean resultado = false;
        String tipoHab = (String) njCTipoHab.getSelectedItem();
        String id = njTFId.getText();
        String area = njTFArea.getText();
        String edoActual = (String) njCEstadoActual.getSelectedItem();
         if (GestionResort.getLasHabitaciones().BuscarHabitacionPorId(id)== false)
         {
        resultado = this.controlHabitacion.nuevaHabitacion(tipoHab, id, area, edoActual);
        if (resultado) {
            JOptionPane.showMessageDialog(null, "Habitacion" + id + " agregado con exito", "Agregado",
                    JOptionPane.INFORMATION_MESSAGE);
            this.mostrarTabla();
        } else {
            JOptionPane.showMessageDialog(null, "Operacion Fallida", "Error",
                    JOptionPane.ERROR_MESSAGE);
        }
      }
         else
               JOptionPane.showMessageDialog(null, "Operacion Fallida la Habitacion con este ID se encuentra registrada ", "Error",
                    JOptionPane.ERROR_MESSAGE); // TODO add your handling code here:
    }//GEN-LAST:event_njAgregarActionPerformed

    private void tablaHabitacionesKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_tablaHabitacionesKeyReleased
       int row = this.tablaHabitaciones.getSelectedRow();
        String id = (String) this.tablaHabitaciones.getModel().getValueAt(row, 1);
        try {
            this.mostrarHabitacion(id);
        } catch (ParseException ex) {
            Logger.getLogger(VentanaOperacionesHabitacion.class.getName()).log(Level.SEVERE, null, ex);
        } // TODO add your handling code here:
    }//GEN-LAST:event_tablaHabitacionesKeyReleased

    /**
    * @param args the command line arguments
    */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new VentanaOperacionesHabitacion().setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel16;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JSeparator jSeparator1;
    private javax.swing.JTabbedPane jTabbedPane1;
    private javax.swing.JButton njAgregar;
    private javax.swing.JComboBox njCEstadoActual;
    private javax.swing.JComboBox njCTipoHab;
    private javax.swing.JTextField njTFArea;
    private javax.swing.JTextField njTFId;
    private javax.swing.JButton sjBActualizar;
    private javax.swing.JButton sjBBorrar;
    private javax.swing.JComboBox sjCEstadoActual;
    private javax.swing.JComboBox sjCTipoHab;
    private javax.swing.JTextField sjTFArea;
    private javax.swing.JTextField sjTFId;
    private javax.swing.JTable tablaHabitaciones;
    // End of variables declaration//GEN-END:variables

}
